package game;

public class AiPlayer extends Player {
	int max, min;
	public AiPlayer(String nickname) {
		super(nickname);
		max = 100;
		min = 0;
	}

	@Override
	public int guess() {
		if (result == 0) {
			return guessNumber;
		}
		if (result < 0) {
			min = guessNumber;
		} else {
			max = guessNumber;
		}
		guessNumber = (min + max) / 2;
		return guessNumber;
	}
}
